home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.4 Development Libraries / SGI IRIX 6.4 Development Libraries.iso / docs6.4 / relnotes / dmedia_dev / ch05.z / ch05
Encoding:
Text File  |  1997-09-04  |  10.6 KB  |  265 lines

  1.  
  2.  
  3.  
  4.                                   - 1 -
  5.  
  6.  
  7.  
  8.        5.  _A_u_d_i_o__L_i_b_r_a_r_y
  9.  
  10.        This chapter lists information about the IRIS Audio Library
  11.        (AL) 2.0 programming interface included in the IRIS Digital
  12.        Media Development Environment.  It includes changes,
  13.        additions, and bug fixes since the IRIX 6.2 and 6.3
  14.        releases, known problems, workarounds, and caveats.
  15.  
  16.        The IRIS Audio Library 2.0 is a C language library that
  17.        provides basic audio I/O, hardware control and
  18.        synchronization capabilities to applications.
  19.  
  20.        The Audio Library is shipped as a dynamic shared library
  21.        (/_u_s_r/_l_i_b/_l_i_b_a_u_d_i_o._s_o) included with the IRIX Development
  22.        Option software.
  23.  
  24.        At the time of this release, the _I_R_I_S _D_i_g_i_t_a_l _M_e_d_i_a
  25.        _P_r_o_g_r_a_m_m_i_n_g _G_u_i_d_e contains a description of the previous
  26.        version of the AL (1.0). AL 1.0 programs will continue to
  27.        work on AL 2.0-equipped systems. Most of the concepts are
  28.        quite similar between the two AL versions, so the _D_i_g_i_t_a_l
  29.        _M_e_d_i_a _P_r_o_g_r_a_m_m_i_n_g _G_u_i_d_e remains a valuable reference. We
  30.        intend to update this programming guide at the earliest
  31.        opportunity.
  32.  
  33.        The on-line manual page _A_L_i_n_t_r_o(_3_d_m) contains a short
  34.        overview of AL 2.0 library functionality and a complete list
  35.        of the procedure calls.  Manual pages for both AL 2.0 calls
  36.        and AL 1.0 calls are included.
  37.  
  38.        5.1  _C_h_a_n_g_e_s__a_n_d__A_d_d_i_t_i_o_n_s
  39.  
  40.        IRIX 6.3 comes with an entirely new version of the Audio
  41.        Library. This version remains backwards-compatible with
  42.        previous versions of the Audio Library; all the older AL
  43.        functions are provided and supported. However, a new set of
  44.        function calls are included in the library. This section
  45.        provides an overview of the features available with the new
  46.        calls.
  47.  
  48.           +o AL 2.0 calls conform to the OpenGL capitalization
  49.             conventions. For example, the new version of
  50.             _A_L_o_p_e_n_p_o_r_t() is called _a_l_O_p_e_n_P_o_r_t().
  51.  
  52.           +o AL 2.0 calls all use units of sample frames. This is
  53.             consistent with the other digital media libraries.
  54.             Where necessary, the new AL function call names have
  55.             been changed to indicate this; for example, the new
  56.             equivalent of _A_L_w_r_i_t_e_s_a_m_p_s() is called _a_l_W_r_i_t_e_F_r_a_m_e_s().
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.                                   - 2 -
  71.  
  72.  
  73.  
  74.           +o The new audio driver supports multiple independent
  75.             audio input and output devices on the same system.
  76.             Applications written with the new AL can address
  77.             multiple devices simultaneously. Old AL applications
  78.             can address only the default input device and default
  79.             output device.  These devices can be set via _a_p_a_n_e_l, or
  80.             by any new AL application.  See the _a_l_P_a_r_a_m_s man page
  81.             for information on default devices.
  82.  
  83.           +o The new audio driver maintains independent gain values
  84.             for each input source. This means users seldom need to
  85.             adjust the input gain when changing input sources.  Now
  86.             when a user selects a new input source, the gain will
  87.             automatically revert to its value when that source was
  88.             previously selected.
  89.  
  90.           +o AL 2.0 provides a scalable, device-independent hardware
  91.             control model. Parameter/value lists and the functions
  92.             which use them have changed substantially. See the
  93.             _a_l_P_a_r_a_m_s, _a_l_S_e_t_P_a_r_a_m_s, and _a_l_G_e_t_P_a_r_a_m_s man pages for
  94.             more information.
  95.  
  96.           +o AL 2.0 introduces new functions for writing zero-valued
  97.             sample-frames (_a_l_Z_e_r_o_F_r_a_m_e_s(_3_d_m)) and for discarding
  98.             sample-frames from an input or output port
  99.             (_a_l_D_i_s_c_a_r_d_F_r_a_m_e_s(_3_d_m)). The latter function satisfies
  100.             request-for-enhancement (RFE) 374702.
  101.  
  102.           +o AL 2.0 removes the minimum queuesize limit (see
  103.             _a_l_S_e_t_Q_u_e_u_e_S_i_z_e(_3_d_m)). This satisfies RFE 158615.
  104.  
  105.           +o In AL 2.0, the printing error handler is off by
  106.             default. See _a_l_S_e_t_E_r_r_o_r_H_a_n_d_l_e_r(_3_d_m).  Note that AL 1.0
  107.             programs relinked with AL 2.0 will acquire this
  108.             behavior.
  109.  
  110.           +o AL 2.0 provides _a_l_G_e_t_E_r_r_o_r_S_t_r_i_n_g(_3_d_m), which returns a
  111.             text string corresponding to any AL error code. This
  112.             simplifies the task of handling function call failures.
  113.  
  114.           +o IRIX 6.3 includes a new version of _a_p_a_n_e_l, the audio
  115.             control panel. This version supports multiple input and
  116.             output devices.
  117.  
  118.        5.2  _C_o_m_p_a_t_i_b_i_l_i_t_y__I_s_s_u_e_s
  119.  
  120.        This section lists the known compatibility issues between AL
  121.        2.0 and previous versions of the AL.
  122.  
  123.        AL 2.0 implements many old AL functions as wrappers around
  124.        new AL equivalents. Older AL programs relinked against AL
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.                                   - 3 -
  137.  
  138.  
  139.  
  140.        2.0 will thus automatically acquire some of the performance
  141.        improvements, enhancements and bug fixes in AL 2.0. However,
  142.        there are some caveats:
  143.  
  144.           +o AL 2.0 is a shared library. Previous versions of the AL
  145.             were statically linked. AL programs compiled or linked
  146.             under IRIX 6.3 cannot be run under previous versions of
  147.             IRIX.
  148.  
  149.           +o _A_L_w_r_i_t_e_s_a_m_p_s() and _A_L_r_e_a_d_s_a_m_p_s() are internally
  150.             implemented in terms of the newer _a_l_W_r_i_t_e_F_r_a_m_e_s() and
  151.             _a_l_R_e_a_d_F_r_a_m_e_s().  While this provides some performance
  152.             improvements, since the new functions are smaller and
  153.             faster, it removes the ability to read and write
  154.             partial sample frames on stereo ports.
  155.  
  156.           +o The default behavior for AL error handling is now
  157.             silence. Older versions of the AL would print messages
  158.             to the screen when an AL call failed. Unless you call
  159.             _a_l_S_e_t_E_r_r_o_r_H_a_n_d_l_e_r(_3_d_m) to install your own error
  160.             handler or to turn on printing messages, AL calls will
  161.             no longer print messages when they fail.
  162.  
  163.        Following are compatibility issues for all old applications
  164.        running on IRIX 6.3, even if not relinked with AL 2.0:
  165.  
  166.           +o The old AL sample-rate AL_RATE_INPUTRATE has different
  167.             semantics with the new audio driver. Setting the output
  168.             rate to AL_RATE_INPUTRATE will cause the rate on the
  169.             default output device to match the rate on the default
  170.             input device, if possible. But the output rate will not
  171.             track further changes to the input rate. Note also that
  172.             on some machines with multiple audio subsystems, it may
  173.             not be possible to match the two rates; the default
  174.             output device and default input device may not support
  175.             the same set of rates, or may not be able to access the
  176.             same timebase.
  177.  
  178.           +o Because the new driver maintains independent gain
  179.             values for each input source, changing the input source
  180.             now changes the input gain value. Old applications
  181.             which expect the gain value to remain constant across
  182.             input source changes may have issues under IRIX 6.3.
  183.  
  184.        5.3  _B_u_g__F_i_x_e_s
  185.  
  186.        This section lists the bugs fixed since the last release of
  187.        the IRIS Audio Library.  Some of the descriptions are
  188.        followed by a Silicon Graphics bug report number in the form
  189.        (SCR XXXX).
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.                                   - 4 -
  203.  
  204.  
  205.  
  206.           +o A problem existed in previous releases of IRIX where a
  207.             rare race-condition could panic the system if a multi-
  208.             process application closed an audio port in one process
  209.             while it attempted to use the port in another process.
  210.             (SCR 334606)
  211.  
  212.           +o In four-channel mode, at sample-rates derived from
  213.             44.1kHz, under certain conditions the front and back
  214.             stereo pairs could become swapped. This has been fixed
  215.             (SCR 315007, 375810).
  216.  
  217.        5.4  _K_n_o_w_n__P_r_o_b_l_e_m_s__a_n_d__W_o_r_k_a_r_o_u_n_d_s
  218.  
  219.        This section lists problems in the Audio Library software
  220.        and ways to work around them.
  221.  
  222.           +o When there is nothing physically connected to the
  223.             digital I/O jack, it is meaningless to set the system
  224.             sample rates in the following three ways:
  225.  
  226.                +o output sample rate set to match the input sample
  227.                  rate while using digital input as the system
  228.                  input.
  229.  
  230.                +o input sample rate set to the digital rate and the
  231.                  output rate set to match the input rate.
  232.  
  233.                +o input sample rate set to the digital rate and the
  234.                  output rate set to the digital input rate.
  235.  
  236.                +o When the system is placed in one of these states,
  237.                  the behavior cannot be predicted. Performing any
  238.                  of the actions listed above should be avoided by
  239.                  application programs.
  240.  
  241.        5.5  _P_r_o_g_r_a_m_m_i_n_g__E_x_a_m_p_l_e_s
  242.  
  243.        The _d_m_e_d_i_a__d_e_v._s_r_c._e_x_a_m_p_l_e_s subsystem contains several
  244.        source code examples for programming with the Audio Library.
  245.        The source code is available in the directory
  246.        /_u_s_r/_s_h_a_r_e/_s_r_c/_d_m_e_d_i_a/_a_u_d_i_o.
  247.  
  248.        The _d_m_e_d_i_a__d_e_v._s_r_c._t_o_o_l_s subsystem includes the source code
  249.        for the standard aaaauuuuddddiiiiooooppppaaaannnneeeellll((((1111)))) and ssssoooouuuunnnnddddppppllllaaaayyyyeeeerrrr((((1111)))) tools
  250.        which are shipped with IRIX 6.2 and later. The source code
  251.        is installed in the directories
  252.        /_u_s_r/_s_h_a_r_e/_s_r_c/_d_m_e_d_i_a/{_a_u_d_i_o_p_a_n_e_l,_s_o_u_n_d_p_l_a_y_e_r}.
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.